<h2>Search Results</h2>
<?
if($GLOBALS['note']){
	echo display_message($GLOBALS['note']);
}

$destinations = new destinations();
// Get search destination
$params['tree_id'] = $results['destination_tree_id'];
$destination_values = $destinations->get_destination($params);
unset($params);


?>

<!-- Start search criteria -->
<div class="box_blue">
<table class="aqua">
    <tr>
        <td width="80"><strong>Destination</strong></td>
        <td width="200"><?= $destination_values["name"] ?></td>
        <td width="80"></td>
        <td width="200"></td>
    </tr>
    <tr>
        <td><strong>Check-in</strong></td>
        <td><?=date("l jS \of F Y", $results["arrival_date"])?></td>
        <td><strong>Rooms</strong></td>
        <td><?=$results["rooms_count"]?></td>
    </tr>
    <tr>
        <td><strong>Check-out</strong></td>
        <td><?=date("l jS \of F Y", $results["arrival_date"]+$results["nights"]*86400)?></td>
        <td><strong>Nights</strong></td>
        <td><?=$results["nights"]?></td>
    </tr>

</table>
</div>
<!-- End search criteria -->


<div class="box_blue">

<div class="col_results_found" style="text-align: center">
<p class="no_margin"><strong><?= count($results["hotels"])?></strong> results found</p>
</div>

<!--<div class="col_sort_by" style="float: left; ">
<div style="display:block;float:left"><label>Sort by:</label></div>
<div style="display:block;float:left">
<select>
<option>Name</option>
</select>
</div>
</div>-->

<div class="clearing"></div>

</div>


<!-- <p style="text-align:center"><strong>[1]</strong> <a href="#">2</a></p> -->

<? if(count($results["hotels"])): ?>
<? foreach($results["hotels"] as $id=>$hotel): ?>

<?

$lurls = new lurls();
$params['tree_id'] = $hotel["extra"]["tree_id"];
$hotel_results_lurl = $lurls->get_hotel_result_lurl($params);
unset($params);

?>




<!-- Start hotel instance -->











<!-- Start hotel details -->
<div class="box_margin">
<div class="col_110">


<div class='thumb_cover_div'>
<a href="#"><img src="<?=$hotel["thumb"]?>" alt="<?=$hotel["extra"]["name"]?>" class="thumb_image_100" />
<img src="/images/thumb_cover_100_74.gif" class="thumb_cover" alt="<?= $hotel['destination']['name'] ?>" /></a>	
</div>


</div>







<div class="col_500">

<p class="title_big"><?= $hotel["extra"]["name"]?></p>
<p class="title_med"><?= $hotel["resort"]["name"]?>, <?=$hotel["destination"]["name"]?></p>

<!-- Start rating -->
<? // youtravel rating for tests, should use hotel_rating which is currently 0 ?>
<p class="no_margin"><?= output_rating($hotel['youtravel_rating'], "star", true); ?>&nbsp;</p>
<!-- End rating -->
<p class="no_margin"><?= trim_me($hotel["extra"]["description"], 180)?><a href="<?= $hotel_results_lurl ?>">more &raquo;</a></p>

</div>




<div class="clearing"></div>



</div>
<!-- End hotel details -->















<form method="post" action="/hotels/booking_details.php" id="booking_<?=$id?>">
<!-- Start hotel rooms -->
<? include SITE_ROOT_PATH."/_lib/html/hotel_rooms.php"; ?>
<div class="form_hotel_book_row">
<input type="hidden" name="hotel_id" value="<?=$hotel["extra"]["hotel_id"]?>">
<input type="image" src="/images/button_book_white.gif" />
</div>
</form>
<script>
  $("#booking_<?=$id?>").validate({
    rules: {
      room_id_1: "required"
    }
  });
</script>

<!-- End hotel rooms -->










<!-- End hotel instance -->
<? endforeach ?>
<? endif ?>
<?  //var_dump($results) ?>
